Convolutions are used in image processing to perform low-pass filtering (blurring), high-pass filtering (sharpening), edge detection, edge enhancement and other functions. Convolution is a weighted sum of pixels in the neighborhood of a source pixel. The weights are determined by a matrix of coefficients called a convolution mask or convolution kernel, which is usually square. The dimensions of the matrix are usually odd, so that the location of the center of the matrix corresponds to the location of the output pixel. A sliding window, called a convolution window, is centered in sequence on each pixel in a source image. An output pixel value is computed by multiplying each pixel value in the convolution window by the corresponding coefficient in the convolution mask and summing the products.
It may be required to perform convolutions with different convolution window dimensions. For example, 5.times.5 and 7.times.7 convolutions may be required under different circumstances. Performing a 7.times.7 convolution on a two-dimensional image requires 49 multiplies and 48 adds for each output pixel generated. Images that are filtered with a 7.times.7 convolution mask often have 256.times.256 or 512.times.512 pixels. A software approach relying on a CPU's math units is quite slow. A dedicated 7.times.7 hardware convolver offers desirable performance, but is expensive, since it uses 49 multipliers and 48 adders.
It is desirable to provide a convolver circuit which performs convolutions at high speed, which can perform convolutions with different convolution window dimensions and which is relatively inexpensive.